package cn.outsourcing.supermarket.mapper;

import cn.outsourcing.supermarket.po.HiolabsOrder;
import cn.outsourcing.supermarket.provider.OrderProvider;
import cn.outsourcing.supermarket.vo.OrderCountVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;

/**
 * Mapper 接口
 *
 * @author gzkemays
 * @since 2021-10-14
 */
@Mapper
public interface HiolabsOrderMapper extends BaseMapper<HiolabsOrder> {
  /**
   * 根据用户 id 获取各类数据数量
   *
   * @param userId 用户id
   * @return 订单类型数量
   */
  @SelectProvider(value = OrderProvider.class, method = "getOrderTypeCount")
  OrderCountVO getOrderTypeCount(Integer userId);
}
